package apirouter

import (
	"slgw_web/api"

	"openzbox.com/frame/echo"
	"openzbox.com/frame/echo/middleware"
)

func InitSystemRouter(group *echo.Group) {
	router := group.Group("/System") //, middleware.AuthMiddleware()
	router.GET("/GetSysUpgrade", api.GetSysUpgrade, middleware.AuthMiddleware())
	router.POST("/EditSysUpgrade", api.EditSysUpgrade, middleware.AuthMiddleware())
	router.POST("/FTPUpgrade", api.FTPUpgrade, middleware.AuthMiddleware())         //FTP升级
	router.POST("/UploadUpgrade", api.UploadUpgrade)                                //固件升级
	router.POST("/ChangeTime", api.ChangeTime, middleware.AuthMiddleware())         //校时
	router.GET("/GetSystemInfo", api.GetSystemInfo, middleware.AuthMiddleware())    //获取系统信息
	router.POST("/EditSystemInfo", api.EditSystemInfo, middleware.AuthMiddleware()) //修改系统信息
	router.GET("/GETVersion", api.GETVersion, middleware.AuthMiddleware())          //获取当前版本号
	router.GET("/GetPassWord", api.GetPassWord)                                     //获取密令 隐藏
	router.POST("/CheckPassWord", api.CheckPassWord, middleware.AuthMiddleware())   //恢复出厂设置 密令验证
	// router.GET("/ExportHandler", api.ExportHandler)    //下载数据库
}
